package com.sm.graduation.apply.dao;

import com.sm.graduation.apply.pojo.ApplyFood;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Bean;

import java.util.List;

@Mapper
public interface ApplyFoodMapper {
    //添加申请
    int addApplyFood(@Param("applyFood") ApplyFood applyFood);
    //获取已申请的餐饮
    List<ApplyFood> selectApplyFoodAll();
    //获取已申请医疗
    List<ApplyFood> selectApplyMedicationAll();
    //根据申请人查询申请的医疗
    List<ApplyFood> selectApplyMedicationbyuser(@Param("user") String user);
    //根据申请人查询申请
    List<ApplyFood> selectApplyFoodbyuser(@Param("user") String user);
    //root根据申请人查询申请
    List<ApplyFood> selectApplyFoodbyuser1(@Param("user") String user);
    //修改申请的状态为同意申请-待使用
    int updateStatus(@Param("id") int id ,@Param("status") String status);
    //超级管理员管理查看所有申请
    List<ApplyFood> selectApply();
    //根据id删除申请
    int delApplyByid(int id);
    //根据用户id查询用户申请的全部服务
    List<ApplyFood> selectmyApply(@Param("uid") int uid);
    //根据用户id查询用户申请的全部服务
    List<ApplyFood> selectmyApplyname(@Param("uid") int uid,@Param("proname") String proname);
    int updateApplyConment(@Param("id") int id,@Param("conment") String conment);
}
